package cn.map;

import java.io.IOException;

import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

 
 
public class trajectory extends HttpServlet {
	private static final long serialVersionUID = 1L;

    
    public trajectory() { 
        
    }

	 
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
         
		String deviceid  = request.getParameter("deviceid");
		String time  = request.getParameter("time");
 
        
		 System.out.println("设备号：" + deviceid);
         System.out.println("时间：" + time);
	 
	 	
	    GetPoint point=new GetPoint();
	    List points = point.getpoint(deviceid,time);
	    System.out.println("长度"+points.size());
 
	   
	    request.setAttribute("lists", points); 
	    
	   
	    request.getRequestDispatcher("/map.jsp").forward(request, response);
	}

 
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request, response);
	}

}



